#ifndef _NODE_
#define _NODE_

#include "Math/3D/Matrix.h"
#include "Core/Memory/HeapObject.h"

class Node : public HeapObject
{
public:

	Node();

	virtual ~Node();

	void AddChild(Node * _pNode);

	void RemoveChild(Node * _pNode);

	uint32 GetChildCount() const;

	Node * GetParent() const;

	const Array<Node*> & GetChildren() const;

	Node * GetChild(uint32 _iIndex) const;

	const Point3f & GetPosition() const;

	const Quaternion & GetRotation() const;

	const Point3f & GetScale() const;

	void SetPosition(const Point3f & _point);

	void SetPosition(float _x, float _y, float _z);

	void SetRotation(float yaw, float pitch, float roll);

	void SetScale(const Point3f & _scale);

	void SetScale(float _scale);

protected:
	/** parent node */
	Node * m_pParent;

	/** children nodes */
	Array<Node *> m_pChildren;

	/** world matrix */
	Matrix4f m_mWorld;
};

#endif /* NODE_H_ */
